/*
 * @Author: Wangtao
 * @Date: 2019-08-27 16:45:06
 * @LastEditors: Wangtao
 * @LastEditTime: 2022-06-22 15:03:35
 */
/**
 * Created by yuwq on 17/9/18.
 */
import send from '../http'
export default {
  /**
   * 查询字典列表
   * @param data
   * @returns {*}
   */
  queryDicList (data) {
    let req = {
      data: data,
      action: 'config.dic.queryDicList'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 字典配置
   * @param data
   * @returns {*}
   */
  findOneAppDic (data) {
    let req = {
      data: data,
      action: 'config.dic.findOneAppDic'
    }
    return send.fetch(req, 'post')
  },
  /**
 * 复制字典
 * {"_id":"009e2e20-3aa9-11e7-8c5b-db195b761c6b"}
 */
  copyOneAppDic (data) {
    let req = {
      data: data,
      action: 'config.dic.cloneDic'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 保存字典配置
   * @param data
   * @returns {*}
   */
  updateOneAppDic (data) {
    let req = {
      data: data,
      action: 'config.dic.updateOneAppDic'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 保存字典
   * @param data
   * @returns {*}
   */
  updateDic (data) {
    let req = {
      data: data,
      action: 'config.dic.updateDic'
    }
    return send.fetch(req, 'post')
  },
/**
   * 字典
   * @param data
   * data:{"name":"23567",  字典名字
   * "cascade":"1"}         级联数
   */
  addDic (data) {
    let req = {
      data: data,
      action: 'config.dic.addDic'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 字典导入
   * @param data
   */
  addDictionaryImportTask (data) {
    let req = {
      data: data,
      action: 'config.dic.addDictionaryImportTask'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 字典导入
   * @param data
   */
  queryDictionaryImportTask (data) {
    let req = {
      data: data,
      action: 'config.dic.queryDictionaryImportTask'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 字典导入删除
   * @param data
   */
  delDictionaryImportTask (data) {
    let req = {
      data: data,
      action: 'config.dic.delDictionaryImportTask'
    }
    return send.fetch(req, 'post')
  }
}

